A Modified Differential Evolution Algorithm Based on Improving A New Mutation Strategy and Self-Adaptation Crossover

The differential evolution algorithm is one of the promising natural inspired population-based metaheuristic algorithms that attracted the attention of researchers in the recent years. This paper presents a new mutation strategy called DE/current-to-best/2 that presents a new mutated vector based on utilizing the distance between the best vector and the current vector along with another random vector. In addition, the crossover procedure is self-adapted to cover low locality and high locality based on the iteration number. To obtain the best results of the proposed modified differential evolution algorithm, design of experiments is done to optimize its parameters. The comparative results are done using 11 optimization problems to compare the classical version of differential evolution algorithm with the new modified version and the results show high efficiency of the proposed DE algorithm in terms of CPU time, evaluation, and accuracy The outline of the work done in this paper can be shown as follows:• The paper produces a new modification of one of the most promising metaheuristics algorithms, the differential evolution algorithm.• The mutation strategy of the algorithm is modified to work with the current solution, the global best solution, and a random solution. The resulted mutated vector from this procedure is used to produce a new modified crossover solution.• The crossover procedure is self-adapted to cover low locality and high locality based on the iteration number, where in case of the odd iterations, the high locality is applied to obtain more diversity, and in case of the even iterations the low locality is applied to obtain local neighbor solutions. The comparison is done with the classical version of the algorithm, and the results show efficiency in terms of CPU time, evaluation, and accuracy.

• The paper produces a new modification of one of the most promising metaheuristics algorithms, the differential evolution algorithm.• The mutation strategy of the algorithm is modified to work with the current solution, the global best solution, and a random solution.The resulted mutated vector from this procedure is used to produce a new modified crossover solution.• The crossover procedure is self-adapted to cover low locality and high locality based on the iteration number, where in case of the odd iterations, the high locality is applied to obtain more diversity, and in case of the even iterations the low locality is applied to obtain local neighbor solutions.The comparison is done with the classical version of the algorithm, and the results show efficiency in terms of CPU time, evaluation, and accuracy.

Introduction
There are many approaches for solving optimization problems.Some of them are called classical approaches that rely on using mathematics, such as the simplex method.These classical approaches can easily deal with low-scale problems and produce exact optimal solutions.However, when the problem is NP-hard, classical approaches encounter a large number of variables and constraints, making them very difficult to apply.Therefore, heuristics and metaheuristic approaches could be ideal in such cases.The word "metaheuristic'' consists of two ancient Greek words.The first one is "meta,'' which means upper-level methodology, and the second one is "heuristic,'' which means the art of discovering new strategies.Therefore, metaheuristics are upper-level methodologies that lead to obtaining approximate optimized solutions by using guiding strategies [1] .Metaheuristics in research are classified into singlebased and population-based metaheuristics.In single-based metaheuristics, each iteration focuses on having a random solution in the solution space, and it searches around it for new neighbours using local search, hoping to find better local solutions.The global best solution is the best solution found throughout all iterations.In the case of population-based metaheuristics, the approach begins by generating a population of random solutions, followed by mutation procedures that change the positions of the included solutions in the population.The main concept is to cover more solution areas in the solution space by having diversified solutions in the population.In each solution area, local search is performed to find the best local solution.This paper presents a new modification to one of the population-based metaheuristics named the differential evolution algorithm (DE).The paper is organized as follows: the second section presents a literature review on DE, the third section describes the modified DE, the fourth section discusses numerical experiments that optimize the parameters of the proposed modified DE, and finally, the fifth section presents the conclusion and future research points.

Literature Review
Qin et al., [2] proposed a self-adaptive DE (SaDE) algorithm, in which both trial vector generation strategies and their associated control parameter values are gradually self-adapted by learning from their previous experiences in generating promising solutions.Zhang and Sanderson [3] proposed a new mutation strategy "DE/current-to pbest" with optional external archive and adaptively updating control parameters.The DE/current-to-pbest is a generalization of the classic "DE/current-to-best", while the optional archive operation utilizes historical data to provide information on progress direction.Both operations diversify the population and improve the convergence performance.Islam et al. [4] proposed a new mutation strategy with binomial crossover and two adaptive control parameters.In their work, a biased selection method is introduced where the mutant vector undergoes crossover with 'p' top-ranked population vectors, rather than the target vector.The authors validated the results on 25 CEC 2005 benchmark problems.Reynoso-Meza et al., [5] used a local search routine to improve convergence and an adaptive crossover operator.Tanabe & Fukunaga [6] proposed a new parameter adaptation technique for DE by using a historical memory of successful control parameter settings in order to guide the selection of future control parameter values.This technique has been evaluated depended on the comparison of 28 problems from the CEC2013 benchmark set.
Xia & Wang [7] proposed a novel Self adaptive Differential Evolution algorithm (SaDE), where the two control parameters of F and CR in addition to the choice of learning strategy are not required to be pre-specified.Tanabe & Fukunaga [8] proposed L-SHADE that extended the SHADE with Linear Population Size Reduction (LPSR).According to the linear function, it has been continually decreased the population size.Fan and Zhang [9] proposed self-adaptive differential evolution with adaptive crossover strategies.Brest et al. [10] presented a differential evolution algorithm (iL-SHADE) which is an improved version of the well-known L-SHADE algorithm.It has been used for solving single objective real parameter optimization problems.Awad et al. [11] proposed algorithm called (LSHADE-EpSin), they used a new ensemble sinusoidal approach in order to adapt automatically the values of the scaling factor of the Differential Evolution algorithm.Brest et al. [12] presented a new algorithm, namely jSO.The algorithm is an improved variant of the iL-SHADE algorithm, mostly it was conjugated with a new weighted version of mutation strategy.Stanovov et al. [13] proposed a new variant of LSHADE algorithm.The basic idea of it is to adapt its mutation strategy by using selective pressure.The experiments were done on CEC 2018 benchmark functions.Stanovov et al. [14] proposed a new parameter control scheme for the differential evolution algorithm.Song et al. [15] presented an enhanced success history adaptive DE with greedy mutation strategy (EBLSHADE) was employed in order to optimize the parameters of PV models to propose a parameter optimization method.Shen et al. [16] proposed a modified jSO algorithm (MJSO) that had a significant impact on the performance of the algorithm.It was based on cosine similarity with parameter adaptation and a novel opposition-based learning restart mechanism.
Most of the previously developed DE algorithms are efficient in terms of convergence speed and simplicity.The previous work on DE algorithms has primarily focused on modifying mutation strategies and implementing self-adaptation.Mutation strategies contribute to achieving a greater diversity of solutions, while self-adaptation processes help reduce the number of trials required in the experimental design by minimizing the number of parameters.This paper presents a new mutation strategy that utilizes the position of the best solution found, the position of the current solution, and another randomly selected solution from the population.This strategy is named DE/current-to-best/2.In the proposed mutation strategy, the new position is calculated proportionally to the best solution found by multiplying a random weight by the distance between the current solution and the best, and another random weight by the distance between the randomly selected solution and the best.This can lead to more diverse solutions and expedite the convergence towards the best solution found.The other modification of the DE algorithm in this paper introduces a new self-adaptation strategy based on the crossover procedure of the algorithm.This crossover procedure involves generating either a new diverse solution using a higher crossover probability, which allows for more characteristics from the mutated solution found by DE/current-to-best/2 or generating a new solution that incorporates more characteristics from the current solution.Additionally, the paper presents a design of experiments in order to optimize the parameters of the newly modified algorithm, which is rarely found in other works.

Differential Evolution Algorithm
As aforementioned, the differential evolution algorithm is one of the population-based metaheuristics.The classical version of the DE algorithm begins with an initial population that consists of random solutions, each with a corresponding vector, to cover diversified areas of the solution space.Thereafter, the algorithm has three phases: mutation, crossover, and selection.The next subsections provide information about these phases and their modifications.

Mutation Phase
In this phase, the vectors of the population solutions are to be mutated using mutation strategies at each iteration .To illustrate some of the strategies, the following notations are used. Notations: The mutated vector    ,

Global best vector in iteration 𝐺 𝐶 𝑖,𝐺
The crossover vector of vector  in iteration   Scaling factor The most common mutation strategies are found in Deng et al. [17] as follows: (1) DE/rand/1 (2) DE/best/1 (3) DE/current-to best/1 (4) DE/rand/2 (5) DE/best/2 The new proposed strategy in this paper named as DE/current-to-best/2, which is shown in Eq. ( 6) .The strategy utilizes the distance between the position of the best vector and the current.In addition, another random vector is to be used with the best vector to extend the modification of the mutated vector.The parameter  is chosen to be a normally distributed random number with a mean of 0 and a standard deviation of 0.5.As mentioned earlier, this strategy enhances diversity by determining a new position based on the distances between the current solution and the best solution found, as well as between a randomly selected solution from the population and the best solution found.The parameter  is selected as a normally distributed random number to incorporate both negative and positive values, which contributes to increased diversity in the mutated vector's components.

Crossover Phase
In this phase, the algorithm generates a new solution that shares characteristics from positions  , and  ,  using crossover probability  .Each element  in the crossover vector  , can be generated as follows: The random number, , in Eq. ( 7) is uniformly distributed random number with the interval [ 0 , 1 ] .The crossover probability plays a role of either having diversity or locality.The higher the crossover probability the higher the diversity, and the lower the crossover probability the higher chance of having a local neighbor solution.In this paper, the proposed crossover probability is to be generated using the iteration number, where the odd iteration number allows for  generated randomly from the interval [ 0 .8 , 1 ] , and for the even iteration number,  is to be generated randomly from the interval [ 0 , 0 .4 ] .So, the odd iterations allow for higher diversity solutions and the even iterations allow to have local neighbor solutions.In the case of odd iterations, the generated crossover rate (  ) is very high and difficult to reach due to the interval including large numbers between 0.8 and 1.Consequently, during odd iterations, most of the components of  , are selected to create the crossover vector.This leads to the creation of a crossover vector that inherits more characteristics from  , , resulting in greater diversity.Conversely, during even iterations, the  value is very low, indicating that most of the components of the crossover vector are selected from  , , resulting in a new vector that can be described as a local neighbor of  , .In summary, odd iterations promote diverse solutions, while even iterations produce local neighbors for the current solution.

Selection Phase
In the selection phase, the best solution found among  , ,  , , and  , will be selected to remain in the population of the next iteration.In case that the evaluations of all of them are the same, then the vector that will remain the population in the next iteration is to be randomly selected from the three vectors.Now all the phases of the proposed modification of the DE algorithm are discussed.Fig. 1 shows the flowchart the new proposed DE algorithm.The source code of the algorithm can be found in https://github.com/sadeer1966/A-Modified-Differential-Evolution-Algorithm-Based-on-Improving-A-New-Mutation-Strategy-and-Self-Adap.
To further illustrate the steps of the modified algorithm, the following pseudo code is provided.Additionally, both the modified DE and classical DE algorithms are coded in Python and can be accessed a thttps://github.com/sadeer1966/A-Modified-Differential-Evolution-Algorithm-Based-on-Improving-A-New-Mutation-Strategy-and-Self-Adap.
The pseudo code of the Proposed algorithm is as follows:

Numerical Experiments
In this section, 11 optimization problems have been selected to test the modified DE algorithm.The evaluation is based on the output of the functions and the CPU time (    ).The problems are listed in Table 5 .This paper proposes two parameters that can be calculated throughout the implementation of the algorithm, which are the scaling factor  that is generated using uniformly distributed random number and the self-adapted crossover probability  .The remaining parameters for the proposed DE algorithm are the population size (  ) and the number of iterations ( ).The population size and number of iterations in any metaheuristic play a crucial role in convergence.Therefore, these two parameters are to be optimized using design of experiments.The selected levels for both the  and  parameters are 10, 30, 50, 70, and 90 solutions and iterations, respectively.The full factorial design consists of multiple factors.Each factor has a set of discrete levels.The experiments in the full factorial design are done according to listing all combinations of these levels across their factors [18] .Therefore, the full factorial design herein can be represented as in Table 1 .
The experimental design in this paper aims to enhance the efficiency of the algorithm by optimizing the evaluation of the test optimization functions and the CPU time required by the proposed DE algorithm.Therefore, the response value (   ) for any trail  , which is required to be minimized, is calculated according to Eq. ( 8) , where  (  ) is the evaluation of the test optimization function.
After running the 25 trails contained in Table 1 , the response value for each trail  is normalized using Eq. ( 9) for each test optimization function and these normalized values (   ) are found as in Table 6 [ 19 ].The analysis of variance (ANOVA) is used to find if there are any differences between levels of the population and iteration factors.After implementing ANOVA using Minitab, it  found that the P-value of the population levels equals to 0.964, which means there is no significant difference between the population levels.The P-value of the iteration levels equals to 0.146, which also means that there is no significant difference between the iteration levels.In case of the population levels, the interval plot of responses vs levels as in Fig. 2 shows that all levels are the same without any further investigation.But in case of the iteration levels, the interval plot of responses vs levels as in Fig. 3 shows that some levels may be investigated between the level 10 and 30.So, the suggestion herein is to keep the population size equals to 10 and make another experiment that include only the iteration factor with levels 10, 15, 20, 25, and 30.After implementing the experiment and   applying ANOVA, it found that the P-value of iteration factor equals to 0.029, which means that not all of its levels come from the same population and there is a significant difference between some or all of these levels.Therefore, Tukey's pairwise comparison test is done to find which levels differ.
So, after applying the Tukey's pairwise comparison test, the grouping information shows two groups that differ from one another, which are A and B. Table 2 shows the grouping information and the interval plot is shown as in Fig. 4 .Since the grouping information shows that level 10 differs from level 30 and level 30 shows better response than level 10, the selected level for iteration factor is 30 iterations.
In summary, according to the experimental design, it can be concluded that the optimized parameters for population can be selected from any level, and in case of the number of iterations factor, the selected parameter level is 30 iterations.The comparative results section shows the results of implementing the proposed DE algorithm with its optimized parameters on 11 test optimization functions.The comparison is done with three different versions of the classical DE algorithm.

Comparative Results
In this section, the comparative results are done between three different types of the classical version of DE and modified DE.All of them are coded using python programming.The three different versions used in this comparison are based on the mutation strategies in Eqs. ( 3) , (4) , and (5) .Because the classical version of DE doesn't have adaptation of  , The  value considered in this comparison equals 0.25.To obtain comparative results, 50 outputs were obtained from each algorithm using the 11 optimization functions listed in Table 5 .Fig. 5 depicts the box plots of the output from each algorithm.It is evident that the modified DE yields similar results to the classical DE, which employs a mutation strategy based on Eq. ( 5) .Both of these methods outperform the remaining algorithms.The box plots also indicate that both the modified DE and the classical DE exhibit lower variability compared to the other algorithms.Table 3 displays the mean comparative results of the output from each algorithm, revealing that the modified DE algorithm outperforms the others in terms of mean results, where the bold text highlights the best outputs.In order to assess the robustness of the results, the standard deviations of the outputs were calculated and are presented in Table 4 .The standard deviation values of the modified DE algorithm demonstrate its superior robustness compared to the other algorithms.

Conclusion
This paper presents a new modification of the DE algorithm in both the mutation and crossover phases.The mutation procedure generates new positions using the distance between the position of the current solution and the position of the best solution found.Additionally, it utilizes the distance between the position of the best solution and a randomly selected position from the population.This type of mutation procedure allows for the generation of neighboring solutions between three positions and converges towards the best solution found.The crossover procedure controls the locality around the position of the current solution based on the iteration number.During odd iterations, the locality becomes higher, resulting in greater diversity.Conversely, during even iterations, the locality decreases, generating local neighbors around the position of the current solution.The scaling factor and the crossover probability are self-adapted in the proposed modified DE.To optimize the parameters of the proposed DE, the design of experiments is conducted with only two factors: the number of iterations and the population size.After optimizing these parameters, comparative results are obtained for 11

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper

Fig. 1 .
Fig. 1.The flowchart of the proposed DE algorithm
optimization problems, comparing the results of the classical version of DE with the modified version.The comparative results demonstrate the high efficiency of the modified DE.It is expected that the modified version of DE will be utilized in future research to address the following problems: -Job shop scheduling problem -Warehouse location problem -Aircraft landing problem -Timetable scheduling problem CRediT author statement Sadeer Fadhil: Conceptualization, Methodology, Software, Validity tests, Data curation, Writing-Original draft preparation, Visualization, Investigation.Hegazy Zaher, Naglaa Ragaa, and Eman Oun: Supervision

Table 3
The mean comparative results

Table 4
The standard deviation comparative results

Table 6
Normalized results